package com.WaVel.service.impl;

import com.Emplyment.vo.CompanyDataVo;
import com.Emplyment.vo.QuestionsDataVo;
import com.Emplyment.vo.UserDataVo;
import com.WaVel.mapper.DataMapper;
import com.WaVel.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class DataServiceImpl implements DataService {

    @Autowired
    private DataMapper dataMapper;

    @Override
    public List<CompanyDataVo> getCompanyData() {
        List<CompanyDataVo> companyData = dataMapper.getCompanyData();
        if (companyData == null){
            return new ArrayList<>();
        }
        return companyData;
    }

    @Override
    public List<QuestionsDataVo> getQustionData() {
        List<QuestionsDataVo> questionData = dataMapper.getQuestionData();
        if (questionData == null){
            return new ArrayList<>();
        }
        return questionData;
    }

    @Override
    public List<UserDataVo> getUserData() {
        List<UserDataVo> userData = dataMapper.getUserData();
        if (userData == null){
            return new ArrayList<>();
        }
        return userData;
    }


}
